package zhtt.demo03DefaultObjectFactory;

import java.util.List;
import java.util.Properties;

import org.apache.ibatis.reflection.factory.DefaultObjectFactory;

/**
 * Created by mengxiaxia on 2017/4/26.
 */
public class DefaultObjectFactoryDemo extends DefaultObjectFactory {

    private static final long serialVersionUID = 986665571463916618L;

    //处理有参构造方法
    @Override
    public <T> T create(Class<T> type, List<Class<?>> constructorArgTypes,
                        List<Object> constructorArgs) {
        System.out.println("DefaultObjectFactory------------>处理有参构造方法");
        return super.create(type, constructorArgTypes, constructorArgs);
    }

    //处理默认的构造方法
    @Override
    public <T> T create(Class<T> type) {
        System.out.println("DefaultObjectFactory------------>处理默认的构造方法");
        return super.create(type);
    }

    //处理参数
    @Override
    public void setProperties(Properties properties) {
        System.out.println("DefaultObjectFactory------------>处理参数");
        super.setProperties(properties);
    }
}